.navbar.navbar-static-top.navbar-ci
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
        %span.sr-only Toggle navigation
        %i.icon-reorder

      = link_to 'GitLab CI', root_path, class: "navbar-brand"

    .collapse.navbar-collapse
      %ul.nav.navbar-nav
        - if current_user && current_user.is_admin
          %li
            = link_to admin_projects_path do
              Admin
        %li
          = link_to 'Help', help_path

      %ul.nav.navbar-nav.pull-right
        - if current_user
          %li
            = link_to user_sessions_path do
              .profile-holder
                = image_tag user_avatar_url(current_user, 64), class: 'avatar s32', alt: ''
                %span= current_user.name
          %li
            = link_to user_sessions_path, class: "logout", method: :delete do
              %i.icon-signout
              Logout
        - else
          %li
            = link_to "Login with GitLab", auth_user_sessions_path, class: 'btn btn-success btn-login'
